#ifndef INC_POINT_H
#define INC_POINT_H

#include <ostream>
#include <bitset>
#include "BaseTypes.h"
#include "Color.h"
/*********************************************/
class Point3D
{
private:
	// Data
	fl32		x,y,z;						// Point 3D coordinates
	Color		c;						// The points color
	
	// Friend access
	friend class Line3D;
	friend class Polygon;
	friend class Camera;
public:
	// Operators
	bool operator==(const Point3D&) const;				// Comparison operator
	void operator=(const Point3D&);					// assignment operator

	// Methods
	void getCoordinates( fl32&, fl32&, fl32& ) const;		// returns the current coordinates of the point
	void setCoordinates(const fl32&, const fl32&, const fl32&);	// Sets the coordinates
	void draw() const;						// Draw the point ( 1 pixel )
	void draw(const uint16) const;					// Draw the point with an arbitrary size
	Color getColor() const;						// Returns the color of the point
	void setColor(const Color&);					// sets the points color
	std::bitset<4> getClipCode() const;				// Returns the Cohen-Sutherland clip code
	Point3D();							// Constructor ( standard ( 0, 0, 0 ) values )
	Point3D( fl32, fl32, fl32 );					// Overloaded constructor with parameter values
	Point3D( fl32, fl32, fl32, const Color&);			// Overloaded constructor with color parameter
	Point3D( const Point3D& );					// Copy contructor
	
};
/*********************************************/
// Output operators
std::ostream& operator<<(std::ostream&, const Point3D&);

#endif // INC_POINT_H